﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/admincp.Master" AutoEventWireup="true"
    CodeBehind="DoiTac.aspx.cs" Inherits="SES.CMS.AdminCP.DoiTac" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            text-align: right;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2 style="text-align: left;">
        Danh sách hỗ trợ thanh toán
    </h2>
    <asp:Panel ID="pnview" runat="server">
        <table style="border: 0px;" width="100%">
            <tr>
                <td>
                    <asp:GridView ID="gvConfig" runat="server" AutoGenerateColumns="False" Width="100%"
                        CssClass="tstyle2" DataKeyNames="DoiTacID" OnPageIndexChanging="gvConfig_PageIndexChanging"
                        OnRowDeleting="gvConfig_RowDeleting" AllowPaging="True" PageSize="100" EnableModelValidation="True"
                        OnRowCommand="gvConfig_RowCommand" 
                        onselectedindexchanged="gvConfig_SelectedIndexChanged">
                        <RowStyle HorizontalAlign="Center" />
                        <Columns>
                            <asp:TemplateField HeaderText="Số TT">
                                <ItemTemplate>
                                    <%#Container.DataItemIndex +1 %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="DoiTacID" HeaderText="ID" Visible="False">
                                <HeaderStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="TenDoiTac" HeaderText="Tên">
                                <ItemStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="Ảnh logo" ItemStyle-Width="9%">
                                <ItemTemplate>
                                    <img width="100px" height="70px" src="<%#"/Media/" + (Eval("ImageUrl")).ToString() %>"
                                        title="<%#Eval("TenDoiTac")%>" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Link" ItemStyle-Width="50%" ItemStyle-HorizontalAlign="Left">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lblValue" Text='<%#Eval("MoTa") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <%-- <asp:BoundField DataField="IsActive" HeaderText="Active" />--%>
                            <asp:TemplateField HeaderText="Thao tác">
                                <ItemTemplate>
                                    <asp:ImageButton ID="btnEdit" runat="server" CommandName="Select" CommandArgument='<%#Eval("DoiTacID") %>'
                                        ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                                    <asp:ImageButton ID="btnDelete" runat="server" CommandArgument='<%#Eval("DoiTacID") %>'
                                        CommandName="Delete" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <EditRowStyle BackColor="#2461BF" />
                        <FooterStyle BackColor="#507CD1" ForeColor="White" Font-Bold="True" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <div>
            <table style="width: 100%">
                <tr>
                    <td align="left" valign="top">
                        <asp:LinkButton ID="themmoi" runat="server" Text="Thêm mới" CssClass="button-gg-green"
                            OnClick="themmoi_Click" />&nbsp; &nbsp; &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </asp:Panel>
    <asp:Panel ID="pnupdate" runat="server" Visible="false">
        <table style="width: 100%;">
            <tr>
                <td>
                    &nbsp;
                </td>
                <td class="style1">
                    <asp:Label ID="Label1" runat="server" Text="Tên ngân hàng"></asp:Label><span style="width: 10px;">:</span>
                </td>
                <td>
                    <asp:TextBox ID="txtName" runat="server" Width="200px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtName" Display="Dynamic" ErrorMessage="*" 
                        ValidationGroup="luuLogo"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                                <td>
                                    &nbsp;</td>
                                <td class="style1">
                                    Ảnh logo <span style="width: 10px;">:</span>
                                    <br />
                                </td>
                                <td>
                                    <asp:FileUpload ID="fulImage" runat="server" AutoPostBack="false" />
                                    <asp:HyperLink ID="hplImage" runat="server" TabIndex="11" Target="_blank" 
                                        Text="[Xem ảnh]" Visible="false"></asp:HyperLink>
                                    
                                    <br />
                                    <%--<hr />--%></td>
                            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td class="style1">
                    <asp:Label ID="Label2" runat="server" Text="Link liên kết"></asp:Label><span style="width: 10px;">:</span>
                </td>
                <td>
                    <asp:TextBox ID="txtLink" runat="server" Width="200px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ControlToValidate="txtLink" Display="Dynamic" ErrorMessage="*" 
                        ValidationGroup="luuLogo"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    &nbsp;
                </td>
                <td class="style1">
                    <asp:LinkButton ID="lbtLuu" runat="server" Text="Lưu lại" CssClass="button-gg-green"
                        OnClick="lbtLuu_Click" ValidationGroup="luuLogo" />
                </td>
                <td>
                    &nbsp;
                    <asp:LinkButton ID="lbtHuy0" runat="server" CausesValidation="False" 
                        CssClass="button-gg-green" OnClick="lbtHuy_Click" Text="Hủy" />
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
